using System;
using System.Collections.Generic;
using System.Text;

namespace AdaptiveHelpDesk.AUI_Model_Components.Watcher.Combo_box
{
    class LowLevelMotionCharacteristics
    {

        #region TOTAL TIME

            public decimal getTotalTime(decimal totalTime)
            {
                return totalTime;
            }

        #endregion


        #region MOUSE VELOCITY

            public decimal getYMouseVelocity(int Ydistance, decimal time)
            {
                if (time.Equals(0))
                {
                    return 0;
                }
                else
                {
                    return decimal.Round((decimal)(Ydistance / time), 3);
                }
            }

       #endregion


        #region MOUSE ACCELERATION

            public decimal getYMouseAcceleration(int distance, decimal time)
            {
                if (time.Equals(0))
                {
                    return 0;
                }
                else
                {
                    //Acceleration = velocity / time
                    return decimal.Round((getYMouseVelocity(distance, time) / time), 3);
                }
            }

        #endregion


        #region DWELLTIME        

            //public void startDwellTime(Timer timerDwell, decimal timeD)
            //{
            //    timeD = 0;
            //    timerDwell.Start();
            //}

            //public void stopDwellTime(Timer timerDwell, int totalDwellTime, int timeD)
            //{
            //   // totalDwellTime += timeD;
            //    timeD = 0;
            //  //  totalDwellTime = 0;
            //    timerDwell.Stop();
            //}

            public void incDwellTime(int totalDwellTime, int timeD)
            {
                if (timeD > 1)
                {
                    totalDwellTime += timeD;
                }
            }

            public decimal getDwellTime(decimal totalDwellTime)
            {
                return totalDwellTime;
            }

        #endregion


    }
}
